package edu.gatech.gro.model;

import edu.gatech.gro.utils.Utils;

public abstract class AbstractObject {

	protected int id;
	protected int creationTime;
	protected int lastUpdateTime;
	protected boolean deleteFlag;

	protected AbstractObject() {
		int now = Utils.getCurrentTimestamp();
		this.creationTime = now;
		this.lastUpdateTime = now;
		this.deleteFlag = false;
	}

	public final int getId() {
		return id;
	}

	public final void setId(int id) {
		this.id = id;
	}

	public final int getCreationTime() {
		return creationTime;
	}

	public final void setCreationTime(int creationTime) {
		this.creationTime = creationTime;
	}

	public final int getLastUpdateTime() {
		return lastUpdateTime;
	}

	public final void setLastUpdateTime(int lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public final boolean isDeleteFlag() {
		return deleteFlag;
	}

	public final void setDeleteFlag(boolean deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

}
